<template>
  <!-- 下月重点安排 -->

  <a-form-model ref="ruleForm" :model="myForm" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
    <!-- 表单 -->

    <title-name title="相关附件" />
    <tableUpload v-model="myForm.fileInfoVOS" :disabled="editModel == 0" business-code="PLAN03" />
    <!-- 页脚操作栏 -->
    <div class="btn_box tool-btns--fixed" style="bottom: 50px" v-if="editModel != 0">
      <a-button type="primary" @click="() => $emit('previousStep')">上一步</a-button>
    </div>
  </a-form-model>
</template>

<script>
import { api } from '@/api/project/performanceAnalysis'
import BaseEditPage from '@/views/baseEditPage' // 编辑详情页基础配置
import BSelect from '@/components/BComponents/BSelect'

import tableUpload from './tableUpload'
export default {
  name: 'nodeCompletion',
  extends: new BaseEditPage(),
  components: {
    BSelect,
    tableUpload
  },

  data() {
    return {
      loading: false, // 加载控件
      editModel: 1, // 操作状态:0 查看;1 编辑

      myForm: { fileInfoVOS: [] }
    }
  },
  props: {
    isAudit: {
      // 是否作为审批详情
      type: Boolean,
      default: false
    },
    form: {
      type: Object,
      default: {}
    }
  },
  watch: {
    isAudit: {
      immediate: true,
      handler(val) {
        if (val) {
          this.$nextTick(() => {
            this.editModel = 0
          })
        }
      }
    }
  },

  mounted() {
    this.myForm = this.form
  },

  methods: {}
}
</script>
<style lang="less" scoped>
/deep/ .form-item  {
  .ant-input:not([disabled]),
  .ant-select:not(.ant-select-disabled) .ant-select-selection,
  .ant-calendar-picker-input,
  .ant-input-number:not([disabled]),
  .ant-cascader-picker {
    border-color: #e4ac0b;

    background-color: #fff9e8;
  }
  .ant-input-disabled,
  .ant-input-number-disabled .ant-input-number-input,
  .ant-time-picker-input[disabled] {
    border-color: #d9d9d9 !important;
    background-color: #f5f5f5 !important;
  }

  .remark {
    .ant-input {
      border-color: inherit;
      background-color: initial;
    }
  }
}
</style>